import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
import uView from '@/uni_modules/uview-ui'
import { toPage } from './utils/tools.js'
import tools from './utils/tools.js'
//分享设置
import share from '@/components/lj-share/wxShare.js'
import customNavbar from '@/components/custom-navbar/index.vue'
Vue.mixin(share)
// import WebsocketTask from './websocket.js'
const Recorder = requirePlugin('Skegn').Recorder 
// let websocket = new WebsocketTask(`ws://api.stkouyu.com:8080/word.eval`,5000)//ws://gray.stkouyu.com:8090/word.eval
Vue.use(uView)
// Vue.prototype.$websocket = websocket;
// Vue.prototype.$recorder = new Recorder({ 
//   	appKey: '17104904810002ab', 
//   	secretKey: 'f885ac70031c89d529378c1b9b5bef61' 
// });
Vue.prototype.$toPage = toPage;
Vue.prototype.$tools = tools;
Vue.component("customNavbar",customNavbar)
App.mpType = 'app'
const app = new Vue({
  ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif